package extended

import "jvmgo/ch05/instructions/base"
import "jvmgo/ch05/rtda"

type IFNULL struct{base.BranchInstruction}

func (self *IFNULL)Execute(frame *rtda.Frame){
	ref := frame.OperandStack().PopRef()
	if ref == nil {
		base.Branch(frame,self.Offset)
	}
}
type IFNONNULL struct{base.BranchInstruction}

func (self *IFNONNULL)Execute(frame *rtda.Frame){
	ref := frame.OperandStack().PopRef()
	if ref != nil {
		base.Branch(frame,self.Offset)
	}
}
